package site.wlwsjsx.iot_backend.mapper;

import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import site.wlwsjsx.iot_backend.entity.LabEnv;
import site.wlwsjsx.iot_backend.entity.LabInfo;

@SpringBootTest
public class LabEnvMapperTest {
    @Resource
    LabInfoMapper labInfoMapper;

    @Resource
    LabEnvMapper labEnvMapper;

    @Test
    public void testSelectById() {
        LabInfo labInfo = labInfoMapper.selectById(1);
        System.out.println(labInfo.toString());
    }

    @Test
    public void testSelectAll() {
        Long res = labInfoMapper.countAll();
        System.out.println(res);
    }

    @Test
    public void testSelectNew() {
        LabEnv labEnv = labEnvMapper.selectLatestByLabId(1);
        System.out.println(labEnv.toString());
    }

}
